﻿Imports System.Windows.Forms
Imports RootCalc.RootCalc

Public Class Options
    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        RootCalc.BackColor = ColorDialog.Color
        If ComboBox1.SelectedItem = "Large" Then
            RootCalc.Height = 500
            RootCalc.Width = 500
        End If

        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ColorDialog.ShowDialog()
    End Sub

    Private Sub Options_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ColorDialog.Color = System.Drawing.SystemColors.Control
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        RootCalc.Width = 424
        RootCalc.Height = 178
    End Sub
End Class
